package com.czp.mall.feign.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.czp.mall.config.ItemFeignClientConfiguration;
import com.czp.mall.feign.pojo.Item;

import feign.Param;
import feign.RequestLine;

//@FeignClient("czp-mall-item") // 指定对应服务名
// @FeignClient(name = "czp-mall-item" , configuration = ItemFeignClientConfiguration.class) // 自定义配置方式
public interface ItemServiceClient {

	// 使用feign默认的注解实现
	@RequestLine("GET /item/{id}")
	 public Item queryItemById(@Param("id") Long id);
	
	// 使用SpringMVC的东西
//	 @RequestMapping(method = RequestMethod.GET, value = "/item/{id}")
//	 public Item queryItemById(@PathVariable("id") Long id);
}
